<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>Connection, yii\elasticsearch\Connection - Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w11621" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w11621-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w11621-collapse" class="collapse navbar-collapse"><ul id="w11622" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w11623" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item active" href="#navigation-11620" data-toggle="collapse" data-parent="#navigation">yii\elasticsearch <b class="caret"></b></a><div id="navigation-11620" class="submenu panel-collapse collapse in"><a class="list-group-item" href="./yii-elasticsearch-activedataprovider.html">ActiveDataProvider</a>
<a class="list-group-item" href="./yii-elasticsearch-activefixture.html">ActiveFixture</a>
<a class="list-group-item" href="./yii-elasticsearch-activequery.html">ActiveQuery</a>
<a class="list-group-item" href="./yii-elasticsearch-activerecord.html">ActiveRecord</a>
<a class="list-group-item" href="./yii-elasticsearch-batchqueryresult.html">BatchQueryResult</a>
<a class="list-group-item" href="./yii-elasticsearch-bulkcommand.html">BulkCommand</a>
<a class="list-group-item" href="./yii-elasticsearch-command.html">Command</a>
<a class="list-group-item active" href="./yii-elasticsearch-connection.html">Connection</a>
<a class="list-group-item" href="./yii-elasticsearch-debugaction.html">DebugAction</a>
<a class="list-group-item" href="./yii-elasticsearch-debugpanel.html">DebugPanel</a>
<a class="list-group-item" href="./yii-elasticsearch-exception.html">Exception</a>
<a class="list-group-item" href="./yii-elasticsearch-query.html">Query</a>
<a class="list-group-item" href="./yii-elasticsearch-querybuilder.html">QueryBuilder</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>Class yii\elasticsearch\Connection</h1>
<div class="top-nav">
    <a href="index.html">All Classes</a>
            | <a href="#properties">Properties</a>
                | <a href="#methods">Methods</a>
                | <a href="#events">Events</a>
        </div>

<table class="summaryTable docClass table table-bordered">
    <colgroup>
        <col class="col-name" />
        <col class="col-value" />
    </colgroup>
            <tr><th>Inheritance</th><td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a> &raquo;
<a href="yii-base-component.html">yii\base\Component</a> &raquo;
<a href="yii-base-object.html">yii\base\Object</a></td></tr>
                <tr><th>Implements</th><td><a href="yii-base-configurable.html">yii\base\Configurable</a></td></tr>
                                    <tr><th>Available since version</th><td>2.0</td></tr>
                    <tr>
          <th>Source Code</th>
          <td><a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php">https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php</a></td>
        </tr>
    </table>

<div class="class-description">
    <p><strong>Elasticsearch Connection is used to connect to an elasticsearch cluster version 0.20 or higher</strong></p>
    
    </div>

<a id="properties"></a>

<div class="summary doc-property">
<h2>Public Properties</h2>

<p><a href="#" class="toggle">Hide inherited properties</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-property" />
    <col class="col-type" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Property</th><th>Type</th><th>Description</th><th>Defined By</th>
</tr>
        <tr id="$activeNode">
        <td><a href="yii-elasticsearch-connection.html#$activeNode-detail">$activeNode</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The active node.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$auth">
        <td><a href="yii-elasticsearch-connection.html#$auth-detail">$auth</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>Authentication data used to connect to the ElasticSearch node.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$autodetectCluster">
        <td><a href="yii-elasticsearch-connection.html#$autodetectCluster-detail">$autodetectCluster</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to autodetect available cluster nodes on <a href="yii-elasticsearch-connection.html#open()-detail">open()</a></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr class="inherited" id="$behaviors">
        <td><a href="yii-base-component.html#$behaviors-detail">$behaviors</a></td>
        <td><a href="yii-base-behavior.html">yii\base\Behavior</a>[]</td>
        <td>List of behaviors attached to this component</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="$clusterState">
        <td><a href="yii-elasticsearch-connection.html#$clusterState-detail">$clusterState</a></td>
        <td></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$connectionTimeout">
        <td><a href="yii-elasticsearch-connection.html#$connectionTimeout-detail">$connectionTimeout</a></td>
        <td><a href="http://www.php.net/language.types.float">float</a></td>
        <td>Timeout to use for connecting to an elasticsearch node.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$dataTimeout">
        <td><a href="yii-elasticsearch-connection.html#$dataTimeout-detail">$dataTimeout</a></td>
        <td><a href="http://www.php.net/language.types.float">float</a></td>
        <td>Timeout to use when reading the response from an elasticsearch node.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$driverName">
        <td><a href="yii-elasticsearch-connection.html#$driverName-detail">$driverName</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>Name of the DB driver</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$isActive">
        <td><a href="yii-elasticsearch-connection.html#$isActive-detail">$isActive</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether the DB connection is established</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$nodeInfo">
        <td><a href="yii-elasticsearch-connection.html#$nodeInfo-detail">$nodeInfo</a></td>
        <td></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$nodes">
        <td><a href="yii-elasticsearch-connection.html#$nodes-detail">$nodes</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>The elasticsearch cluster nodes to connect to.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="$queryBuilder">
        <td><a href="yii-elasticsearch-connection.html#$queryBuilder-detail">$queryBuilder</a></td>
        <td><a href="yii-elasticsearch-querybuilder.html">yii\elasticsearch\QueryBuilder</a></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
    </table>
</div>

<a id="methods"></a>

<div class="summary doc-method">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
        <tr class="inherited" id="__call()">
        <td><a href="yii-base-component.html#__call()-detail">__call()</a></td>
        <td>Calls the named method which is not a class method.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__clone()">
        <td><a href="yii-base-component.html#__clone()-detail">__clone()</a></td>
        <td>This method is called after the object is created by cloning an existing one.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__construct()">
        <td><a href="yii-base-object.html#__construct()-detail">__construct()</a></td>
        <td>Constructor.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr class="inherited" id="__get()">
        <td><a href="yii-base-component.html#__get()-detail">__get()</a></td>
        <td>Returns the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__isset()">
        <td><a href="yii-base-component.html#__isset()-detail">__isset()</a></td>
        <td>Checks if a property is set, i.e. defined and not null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__set()">
        <td><a href="yii-base-component.html#__set()-detail">__set()</a></td>
        <td>Sets the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="__sleep()">
        <td><a href="yii-elasticsearch-connection.html#__sleep()-detail">__sleep()</a></td>
        <td>Closes the connection when this component is being serialized.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr class="inherited" id="__unset()">
        <td><a href="yii-base-component.html#__unset()-detail">__unset()</a></td>
        <td>Sets a component property to be null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="attachBehavior()">
        <td><a href="yii-base-component.html#attachBehavior()-detail">attachBehavior()</a></td>
        <td>Attaches a behavior to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="attachBehaviors()">
        <td><a href="yii-base-component.html#attachBehaviors()-detail">attachBehaviors()</a></td>
        <td>Attaches a list of behaviors to the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="behaviors()">
        <td><a href="yii-base-component.html#behaviors()-detail">behaviors()</a></td>
        <td>Returns a list of behaviors that this component should behave as.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="canGetProperty()">
        <td><a href="yii-base-component.html#canGetProperty()-detail">canGetProperty()</a></td>
        <td>Returns a value indicating whether a property can be read.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="canSetProperty()">
        <td><a href="yii-base-component.html#canSetProperty()-detail">canSetProperty()</a></td>
        <td>Returns a value indicating whether a property can be set.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="className()">
        <td><a href="yii-base-object.html#className()-detail">className()</a></td>
        <td>Returns the fully qualified name of this class.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr id="close()">
        <td><a href="yii-elasticsearch-connection.html#close()-detail">close()</a></td>
        <td>Closes the currently active DB connection.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="createBulkCommand()">
        <td><a href="yii-elasticsearch-connection.html#createBulkCommand()-detail">createBulkCommand()</a></td>
        <td>Creates a bulk command for execution.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="createCommand()">
        <td><a href="yii-elasticsearch-connection.html#createCommand()-detail">createCommand()</a></td>
        <td>Creates a command for execution.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr id="delete()">
        <td><a href="yii-elasticsearch-connection.html#delete()-detail">delete()</a></td>
        <td>Performs DELETE HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr class="inherited" id="detachBehavior()">
        <td><a href="yii-base-component.html#detachBehavior()-detail">detachBehavior()</a></td>
        <td>Detaches a behavior from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="detachBehaviors()">
        <td><a href="yii-base-component.html#detachBehaviors()-detail">detachBehaviors()</a></td>
        <td>Detaches all behaviors from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="ensureBehaviors()">
        <td><a href="yii-base-component.html#ensureBehaviors()-detail">ensureBehaviors()</a></td>
        <td>Makes sure that the behaviors declared in <a href="yii-base-component.html#behaviors()-detail">behaviors()</a> are attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="get()">
        <td><a href="yii-elasticsearch-connection.html#get()-detail">get()</a></td>
        <td>Performs GET HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr class="inherited" id="getBehavior()">
        <td><a href="yii-base-component.html#getBehavior()-detail">getBehavior()</a></td>
        <td>Returns the named behavior object.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="getBehaviors()">
        <td><a href="yii-base-component.html#getBehaviors()-detail">getBehaviors()</a></td>
        <td>Returns all behaviors attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="getClusterState()">
        <td><a href="yii-elasticsearch-connection.html#getClusterState()-detail">getClusterState()</a></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="getDriverName()">
        <td><a href="yii-elasticsearch-connection.html#getDriverName()-detail">getDriverName()</a></td>
        <td>Returns the name of the DB driver for the current <span class="broken-link">\yii\elasticsearch\dsn</span>.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="getIsActive()">
        <td><a href="yii-elasticsearch-connection.html#getIsActive()-detail">getIsActive()</a></td>
        <td>Returns a value indicating whether the DB connection is established.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="getNodeInfo()">
        <td><a href="yii-elasticsearch-connection.html#getNodeInfo()-detail">getNodeInfo()</a></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="getQueryBuilder()">
        <td><a href="yii-elasticsearch-connection.html#getQueryBuilder()-detail">getQueryBuilder()</a></td>
        <td>Creates new query builder instance</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr class="inherited" id="hasEventHandlers()">
        <td><a href="yii-base-component.html#hasEventHandlers()-detail">hasEventHandlers()</a></td>
        <td>Returns a value indicating whether there is any handler attached to the named event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasMethod()">
        <td><a href="yii-base-component.html#hasMethod()-detail">hasMethod()</a></td>
        <td>Returns a value indicating whether a method is defined.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasProperty()">
        <td><a href="yii-base-component.html#hasProperty()-detail">hasProperty()</a></td>
        <td>Returns a value indicating whether a property is defined for this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="head()">
        <td><a href="yii-elasticsearch-connection.html#head()-detail">head()</a></td>
        <td>Performs HEAD HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr id="init()">
        <td><a href="yii-elasticsearch-connection.html#init()-detail">init()</a></td>
        <td></td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr class="inherited" id="off()">
        <td><a href="yii-base-component.html#off()-detail">off()</a></td>
        <td>Detaches an existing event handler from this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="on()">
        <td><a href="yii-base-component.html#on()-detail">on()</a></td>
        <td>Attaches an event handler to an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="open()">
        <td><a href="yii-elasticsearch-connection.html#open()-detail">open()</a></td>
        <td>Establishes a DB connection.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr id="post()">
        <td><a href="yii-elasticsearch-connection.html#post()-detail">post()</a></td>
        <td>Performs POST HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
            <tr id="put()">
        <td><a href="yii-elasticsearch-connection.html#put()-detail">put()</a></td>
        <td>Performs PUT HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr class="inherited" id="trigger()">
        <td><a href="yii-base-component.html#trigger()-detail">trigger()</a></td>
        <td>Triggers an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
    </table>
</div>

<div class="summary doc-method">
<h2>Protected Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
                                                                            <tr id="decodeErrorBody()">
        <td><a href="yii-elasticsearch-connection.html#decodeErrorBody()-detail">decodeErrorBody()</a></td>
        <td>Try to decode error information if it is valid json, return it if not.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                                                                            <tr id="httpRequest()">
        <td><a href="yii-elasticsearch-connection.html#httpRequest()-detail">httpRequest()</a></td>
        <td>Performs HTTP request</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                <tr id="initConnection()">
        <td><a href="yii-elasticsearch-connection.html#initConnection()-detail">initConnection()</a></td>
        <td>Initializes the DB connection.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                        <tr id="populateNodes()">
        <td><a href="yii-elasticsearch-connection.html#populateNodes()-detail">populateNodes()</a></td>
        <td>Populates <a href="yii-elasticsearch-connection.html#$nodes-detail">$nodes</a> with the result of a cluster nodes request.</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
                    <tr id="selectActiveNode()">
        <td><a href="yii-elasticsearch-connection.html#selectActiveNode()-detail">selectActiveNode()</a></td>
        <td>Select active node randomly</td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
        </table>
</div>

<a id="events"></a>
<div class="summary doc-event">
    <h2>Events</h2>

    <p><a href="#" class="toggle">Hide inherited events</a></p>

    <table class="summary-table table table-striped table-bordered table-hover">
    <colgroup>
        <col class="col-event" />
        <col class="col-type" />
        <col class="col-description" />
        <col class="col-defined" />
    </colgroup>
    <tr>
        <th>Event</th><th>Type</th><th>Description</th><th>Defined By</th>
    </tr>
        <tr id="EVENT_AFTER_OPEN">
        <td><a href="yii-elasticsearch-connection.html#EVENT_AFTER_OPEN-detail">EVENT_AFTER_OPEN</a></td>
        <td>\yii\elasticsearch\Event</td>
        <td>
            An event that is triggered after a DB connection is established                    </td>
        <td><a href="yii-elasticsearch-connection.html">yii\elasticsearch\Connection</a></td>
    </tr>
        </table>
</div>

<a id="constants"></a>

<h2>Property Details</h2>

<div class="property-doc">

    <div class="detail-header h3" id="$activeNode-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$activeNode-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L61" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L61" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $activeNode        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>The active node. Key of one of the <a href="yii-elasticsearch-connection.html#$nodes-detail">$nodes</a>. Will be randomly selected on <a href="yii-elasticsearch-connection.html#open()-detail">open()</a>.</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <a href="yii-elasticsearch-connection.html#$activeNode-detail">$activeNode</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span></div>


    <div class="detail-header h3" id="$auth-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$auth-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L73" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L73" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $auth        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Authentication data used to connect to the ElasticSearch node.</p>
<p>Array elements:</p>
<ul>
<li><code>username</code>: the username for authentication.</li>
<li><code>password</code>: the password for authentication.</li>
</ul>
<p>Array either MUST contain both username and password on not contain any authentication credentials.</p>

        <p>See also <a href="http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_configuration.html#_example_configuring_http_basic_auth">http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_configuration.html#_example_configuring_http_basic_auth</a>.</p>    </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-elasticsearch-connection.html#$auth-detail">$auth</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[]</span></div>


    <div class="detail-header h3" id="$autodetectCluster-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$autodetectCluster-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L36" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L36" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $autodetectCluster        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Whether to autodetect available cluster nodes on <a href="yii-elasticsearch-connection.html#open()-detail">open()</a></p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <a href="yii-elasticsearch-connection.html#$autodetectCluster-detail">$autodetectCluster</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span></div>


    <div class="detail-header h3" id="$clusterState-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$clusterState-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $clusterState        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        
            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#getClusterState()-detail">getClusterState</a></strong> ( )</div>


    <div class="detail-header h3" id="$connectionTimeout-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$connectionTimeout-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L79" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L79" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $connectionTimeout        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Timeout to use for connecting to an elasticsearch node.
This value will be used to configure the curl <code>CURLOPT_CONNECTTIMEOUT</code> option.
If not set, no explicit timeout will be set for curl.</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.float">float</a></span> <a href="yii-elasticsearch-connection.html#$connectionTimeout-detail">$connectionTimeout</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span></div>


    <div class="detail-header h3" id="$dataTimeout-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$dataTimeout-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L85" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L85" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $dataTimeout        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Timeout to use when reading the response from an elasticsearch node.
This value will be used to configure the curl <code>CURLOPT_TIMEOUT</code> option.
If not set, no explicit timeout will be set for curl.</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.float">float</a></span> <a href="yii-elasticsearch-connection.html#$dataTimeout-detail">$dataTimeout</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span></div>


    <div class="detail-header h3" id="$driverName-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$driverName-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $driverName        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        <p>Name of the DB driver</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-elasticsearch-connection.html#getDriverName()-detail">getDriverName</a></strong> ( )</div>


    <div class="detail-header h3" id="$isActive-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$isActive-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $isActive        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        <p>Whether the DB connection is established</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-elasticsearch-connection.html#getIsActive()-detail">getIsActive</a></strong> ( )</div>


    <div class="detail-header h3" id="$nodeInfo-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$nodeInfo-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $nodeInfo        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        
            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#getNodeInfo()-detail">getNodeInfo</a></strong> ( )</div>


    <div class="detail-header h3" id="$nodes-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$nodes-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L55" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L55" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $nodes        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>The elasticsearch cluster nodes to connect to.</p>
<p>This is populated with the result of a cluster nodes request when <a href="yii-elasticsearch-connection.html#$autodetectCluster-detail">$autodetectCluster</a> is true.</p>
<p>Additional special options:</p>
<ul>
<li><code>auth</code>: overrides <a href="yii-elasticsearch-connection.html#$auth-detail">$auth</a> property. For example:</li>
</ul>
<pre><code class="hljs php language-php">[
 <span class="hljs-string">'http_address'</span> =&gt; <span class="hljs-string">'inet[/127.0.0.1:9200]'</span>,
 <span class="hljs-string">'auth'</span> =&gt; [<span class="hljs-string">'username'</span> =&gt; <span class="hljs-string">'yiiuser'</span>, <span class="hljs-string">'password'</span> =&gt; <span class="hljs-string">'yiipw'</span>], <span class="hljs-comment">// Overrides the `auth` property of the class with specific login and password</span>
 <span class="hljs-comment">//'auth' =&gt; ['username' =&gt; 'yiiuser', 'password' =&gt; 'yiipw'], // Disabled auth regardless of `auth` property of the class</span>
]
</code></pre>

        <p>See also <a href="http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html#cluster-nodes-info">http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html#cluster-nodes-info</a>.</p>    </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-elasticsearch-connection.html#$nodes-detail">$nodes</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[[</span><span style="color: #DD0000">'http_address'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'inet[/127.0.0.1:9200]'</span><span style="color: #007700">]]</span></div>


    <div class="detail-header h3" id="$queryBuilder-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#$queryBuilder-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $queryBuilder        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        
            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-elasticsearch-querybuilder.html">yii\elasticsearch\QueryBuilder</a></span> <strong><a href="yii-elasticsearch-connection.html#getQueryBuilder()-detail">getQueryBuilder</a></strong> ( )</div>

</div>
<h2>Method Details</h2>

<div class="method-doc">

    <div class="detail-header h3" id="__sleep()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#__sleep()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L106" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L106" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        __sleep()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Closes the connection when this component is being serialized.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-elasticsearch-connection.html#__sleep()-detail">__sleep</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="close()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#close()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L186" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L186" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        close()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Closes the currently active DB connection.</strong></p>

        <p>It does nothing if the connection is already closed.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#close()-detail">close</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="createBulkCommand()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#createBulkCommand()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L239" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L239" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        createBulkCommand()
        <span class="detail-header-tag small">
            public                                    method
                            (available since version 2.0.5)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates a bulk command for execution.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-elasticsearch-bulkcommand.html">yii\elasticsearch\BulkCommand</a></span> <strong><a href="yii-elasticsearch-connection.html#createBulkCommand()-detail">createBulkCommand</a></strong> ( <span style="color: #0000BB">$config&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$config</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The configuration for the <a href="yii-elasticsearch-bulkcommand.html">yii\elasticsearch\BulkCommand</a> class</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-bulkcommand.html">yii\elasticsearch\BulkCommand</a></td>
                  <td class="param-desc-col"><p>The DB command</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="createCommand()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#createCommand()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L224" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L224" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        createCommand()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates a command for execution.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-elasticsearch-command.html">yii\elasticsearch\Command</a></span> <strong><a href="yii-elasticsearch-connection.html#createCommand()-detail">createCommand</a></strong> ( <span style="color: #0000BB">$config&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$config</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The configuration for the Command class</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-command.html">yii\elasticsearch\Command</a></td>
                  <td class="param-desc-col"><p>The DB command</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="decodeErrorBody()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#decodeErrorBody()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L540" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L540" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        decodeErrorBody()
        <span class="detail-header-tag small">
            protected                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Try to decode error information if it is valid json, return it if not.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#decodeErrorBody()-detail">decodeErrorBody</a></strong> ( <span style="color: #0000BB">$body</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"></td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="delete()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#delete()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L335" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L335" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        delete()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs DELETE HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#delete()-detail">delete</a></strong> ( <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$body&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$raw&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL options</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$raw</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>If response body contains JSON and should be decoded</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>Response</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="get()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#get()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L268" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L268" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        get()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs GET HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#get()-detail">get</a></strong> ( <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$body&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$raw&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL options</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$raw</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>If response body contains JSON and should be decoded</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>Response</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="getClusterState()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#getClusterState()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L558" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L558" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getClusterState()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#getClusterState()-detail">getClusterState</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="getDriverName()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#getDriverName()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L214" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L214" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getDriverName()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Returns the name of the DB driver for the current <span class="broken-link">\yii\elasticsearch\dsn</span>.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-elasticsearch-connection.html#getDriverName()-detail">getDriverName</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Name of the DB driver</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getIsActive()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#getIsActive()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L117" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L117" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getIsActive()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Returns a value indicating whether the DB connection is established.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-elasticsearch-connection.html#getIsActive()-detail">getIsActive</a></strong> ( )</td></tr>
                                                <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the DB connection is established</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getNodeInfo()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#getNodeInfo()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L553" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L553" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getNodeInfo()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#getNodeInfo()-detail">getNodeInfo</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="getQueryBuilder()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#getQueryBuilder()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L252" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L252" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getQueryBuilder()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates new query builder instance</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-elasticsearch-querybuilder.html">yii\elasticsearch\QueryBuilder</a></span> <strong><a href="yii-elasticsearch-connection.html#getQueryBuilder()-detail">getQueryBuilder</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="head()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#head()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L284" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L284" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        head()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs HEAD HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#head()-detail">head</a></strong> ( <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$body&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL options</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>Response</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="httpRequest()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#httpRequest()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L378" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L378" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        httpRequest()
        <span class="detail-header-tag small">
            protected                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#httpRequest()-detail">httpRequest</a></strong> ( <span style="color: #0000BB">$method</span>, <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$requestBody&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$raw&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$method</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Method name</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$requestBody</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$raw</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>If response body contains JSON and should be decoded</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>If request failed</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"><p>if request failed</p>
</td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="init()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#init()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L93" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L93" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        init()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong></strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#init()-detail">init</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="initConnection()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#initConnection()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L205" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L205" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        initConnection()
        <span class="detail-header-tag small">
            protected                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Initializes the DB connection.</strong></p>

        <p>This method is invoked right after the DB connection is established.
The default implementation triggers an <a href="yii-elasticsearch-connection.html#EVENT_AFTER_OPEN-detail">EVENT_AFTER_OPEN</a> event.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#initConnection()-detail">initConnection</a></strong> ( )</td></tr>
            </table>

<!--	-->

    <div class="detail-header h3" id="open()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#open()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L127" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L127" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        open()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Establishes a DB connection.</strong></p>

        <p>It does nothing if a DB connection has already been established.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#open()-detail">open</a></strong> ( )</td></tr>
                                                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"><p>if connection fails</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="populateNodes()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#populateNodes()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L150" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L150" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        populateNodes()
        <span class="detail-header-tag small">
            protected                                    method
                            (available since version 2.0.4)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Populates <a href="yii-elasticsearch-connection.html#$nodes-detail">$nodes</a> with the result of a cluster nodes request.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#populateNodes()-detail">populateNodes</a></strong> ( )</td></tr>
                                                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"><p>if no active node(s) found</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="post()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#post()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L301" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L301" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        post()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs POST HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#post()-detail">post</a></strong> ( <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$body&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$raw&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL options</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$raw</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>If response body contains JSON and should be decoded</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>Response</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="put()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#put()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L318" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L318" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        put()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Performs PUT HTTP request</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type">mixed</span> <strong><a href="yii-elasticsearch-connection.html#put()-detail">put</a></strong> ( <span style="color: #0000BB">$url</span>, <span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$body&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$raw&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$url</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$options</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>URL options</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$body</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Request body</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$raw</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>If response body contains JSON and should be decoded</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>Response</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-elasticsearch-exception.html">yii\elasticsearch\Exception</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidconfigexception.html">yii\base\InvalidConfigException</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="selectActiveNode()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#selectActiveNode()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L176" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L176" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        selectActiveNode()
        <span class="detail-header-tag small">
            protected                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Select active node randomly</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">protected</span> <span class="signature-type">void</span> <strong><a href="yii-elasticsearch-connection.html#selectActiveNode()-detail">selectActiveNode</a></strong> ( )</td></tr>
            </table>

<!--	-->
</div>
    <h2>Event Details</h2>

<div class="event-doc">
    <div class="detail-header h3" id="EVENT_AFTER_OPEN-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-elasticsearch-connection.html#EVENT_AFTER_OPEN-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-elasticsearch/edit/master/Connection.php#L31" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-elasticsearch/blob/master/Connection.php#L31" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        EVENT_AFTER_OPEN        <span class="detail-header-tag small">
        event
        of type \yii\elasticsearch\Event                </span>
    </div>

    <div class="doc-description">
        <p>An event that is triggered after a DB connection is established</p>

            </div>

</div>
    </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:15:55 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
